import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/2048',
    name: '2048',
    component: () => import('../views/2048/2048_2/2048.vue')
  },
  {
    path: '/tcs',
    name: 'tcs',
    component: () => import('../views/tcs/tcs.vue')
  },
  {
    path: '/shuiguo',
    name: 'shuiguo',
    component: () => import('../views/shuiguo/shuiguo.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/tfjs',
    name: 'tfjs',
    component: () => import('../views/tfjs/tfjs.vue')
  },
  {
    path: '/virtualizedScroll',
    name: 'virtualizedScroll',
    component: () => import('../views/virtualizedScroll/virtualizedScroll.vue')
  },
  {
    path: '/vue-virtual-scroll-list',
    name: 'vue-virtual-scroll-list',
    component: () => import('../views/vue-virtual-scroll-list/virtual-scroll-list.vue')
  },
  {
    path: '/arithmetic',
    name: 'arithmetic',
    component: () => import('../views/arithmetic/arithmetic.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
